home *** CD-ROM | disk | FTP | other *** search
- Path: uunet!jarthur!bridge2!mips!sgi!decwrl!apple!portal!atari!imagen!sun!otc.otca.oz.au
- From: gregm@otc.otca.oz.au (Greg McFarlane)
- Newsgroups: comp.sources.x
- Subject: v09i075: Xmon, Patch2, Part01/01
- Message-ID: <143471@sun.Eng.Sun.COM>
- Date: 8 Oct 90 17:43:07 GMT
- References: <csx-09i075:xmon@uunet.UU.NET>
- Sender: news@sun.Eng.Sun.COM
- Lines: 1032
- Approved: argv@sun.com
-
- Submitted-by: Greg McFarlane <gregm@otc.otca.oz.au>
- Posting-number: Volume 9, Issue 75
- Archive-name: xmon/patch2
- Patch-To: xmon: Volume 9, Issue 15-19 (9/4/90)
- Patch-To: xmon: Volume 9, Issue 30 (9/12/90: patch1)
-
- This patch fixes the following problems:
-
- 1. Synthetic events (events sent by XSendEvent) are handled correctly.
- 2. There was a bug in version 1 when a client exited.
- 3. Byte swapping is now handled correctly.
-
- ---- Cut Here and unpack ----
- #!/bin/sh
- # This is xmon, a shell archive (shar 3.32)
- # made 10/08/1990 09:03 UTC by gregm@otc.otca.oz.au
- # Source directory /u/projects/multi/xmux/xmon
- #
- # existing files will NOT be overwritten
- #
- # This shar contains:
- # length mode name
- # ------ ---------- ------------------------------------------
- # 25407 -rw-rw-r-- xmon.patch2
- #
- if touch 2>&1 | fgrep 'amc' > /dev/null
- then TOUCH=touch
- else TOUCH=true
- fi
- # ============= xmon.patch2 ==============
- if test X"$1" != X"-c" -a -f 'xmon.patch2'; then
- echo "File already exists: skipping 'xmon.patch2'"
- else
- echo "x - extracting xmon.patch2 (Text)"
- sed 's/^X//' << 'SHAR_EOF' > xmon.patch2 &&
- Xxmon patch 2
- X
- XThis patch fixes the following problems:
- X
- X1. Synthetic events (events sent by XSendEvent) are handled correctly.
- X2. There was a bug in version 1 when a client exited.
- X3. Byte swapping is now handled correctly.
- X
- XPlus some minor code clean up.
- X
- XIt makes patches to the following files:
- Xpatchlevel.h
- Xdecode11.c
- Xlinkl.c
- Xlinkl.h
- Xmain.c
- Xprint11.c
- Xserver.c
- Xtable11.c
- X
- Xdiff -c version1/patchlevel.h version2/patchlevel.h
- X*** version1/patchlevel.h Mon Sep 10 15:33:48 1990
- X--- version2/patchlevel.h Thu Sep 27 17:03:30 1990
- X***************
- X*** 1 ****
- X! #define PATCHLEVEL 1
- X--- 1 ----
- X! #define PATCHLEVEL 2
- XOnly in version2: Makefile.bak
- Xdiff -c version1/decode11.c version2/decode11.c
- X*** version1/decode11.c Mon Sep 10 14:31:16 1990
- X--- version2/decode11.c Thu Sep 27 17:15:50 1990
- X***************
- X*** 1002,1008 ****
- X long n;
- X {
- X int fd = server->fdd->fd;
- X! short Event = IByte (&buf[0]);
- X
- X if (CountEvents)
- X {
- X--- 1002,1008 ----
- X long n;
- X {
- X int fd = server->fdd->fd;
- X! short Event = IByte (&buf[0]) & 0x7f;
- X
- X if (CountEvents)
- X {
- Xdiff -c version1/linkl.c version2/linkl.c
- X*** version1/linkl.c Mon Sep 10 14:31:16 1990
- X--- version2/linkl.c Thu Sep 27 17:20:23 1990
- X***************
- X*** 145,150 ****
- X--- 145,158 ----
- X }
- X
- X Global void
- X+ deleteList(list)
- X+ LinkList *list;
- X+ {
- X+ while (!ListIsEmpty(list))
- X+ deleteFirst(list);
- X+ }
- X+
- X+ Global void
- X freeList(list)
- X LinkList *list;
- X {
- X***************
- X*** 157,162 ****
- X--- 165,256 ----
- X LinkList *list;
- X {
- X Tfree(deleteCurrent(list));
- X+ }
- X+
- X+ Global Bool
- X+ freeMatchingLeaf(list, contents)
- X+ LinkList *list;
- X+ Pointer contents;
- X+ {
- X+ LinkLeaf *leaf;
- X+
- X+ for(leaf = list->top; leaf != (LinkLeaf *)list; leaf = leaf->next)
- X+ if (leaf->contents == contents)
- X+ {
- X+ freeLeaf(list, leaf);
- X+ return True;
- X+ }
- X+ return False;
- X+ }
- X+
- X+ Global LinkLeaf*
- X+ findMatchingLeaf(list, contents)
- X+ LinkList *list;
- X+ Pointer contents;
- X+ {
- X+ LinkLeaf *leaf;
- X+
- X+ for(leaf = list->top; leaf != (LinkLeaf *)list; leaf = leaf->next)
- X+ if (leaf->contents == contents)
- X+ return leaf;
- X+ return (LinkLeaf *)NULL;
- X+ }
- X+
- X+ Global int
- X+ indexOfContents(list, contents)
- X+ LinkList *list;
- X+ Pointer contents;
- X+ {
- X+ LinkLeaf *leaf;
- X+ int index = 0;
- X+
- X+ for(leaf = list->top; leaf != (LinkLeaf *)list; leaf = leaf->next, index++)
- X+ if (leaf->contents == contents)
- X+ return index;
- X+ return -1;
- X+ }
- X+
- X+ Global Pointer
- X+ getIndexedContents(list, index)
- X+ LinkList *list;
- X+ int index;
- X+ {
- X+ LinkLeaf *leaf;
- X+ int count = 0;
- X+
- X+ for(leaf = list->top; leaf != (LinkLeaf *)list; leaf = leaf->next, count++)
- X+ if (count == index)
- X+ return leaf->contents;
- X+ return (Pointer)-1;
- X+ }
- X+
- X+ Global void
- X+ freeLeaf(list, leaf)
- X+ LinkList *list;
- X+ LinkLeaf *leaf;
- X+ {
- X+ Tfree(deleteLeaf(list, leaf));
- X+ }
- X+
- X+ Global Pointer
- X+ deleteLeaf(list, leaf)
- X+ LinkList *list;
- X+ LinkLeaf *leaf;
- X+ {
- X+ Pointer contents;
- X+
- X+ if (leaf == (LinkLeaf *)list)
- X+ return ((Pointer)NULL);
- X+ else if (leaf == list->current)
- X+ return deleteCurrent(list);
- X+ else
- X+ {
- X+ leaf->prev->next = leaf->next;
- X+ leaf->next->prev = leaf->prev;
- X+ contents = leaf->contents;
- X+ Tfree(leaf);
- X+ return(contents);
- X+ }
- X }
- X
- X static void
- Xdiff -c version1/linkl.h version2/linkl.h
- X*** version1/linkl.h Mon Sep 10 14:31:16 1990
- X--- version2/linkl.h Thu Sep 27 17:42:15 1990
- X***************
- X*** 46,53 ****
- X--- 46,60 ----
- X Global Pointer deleteCurrent P((LinkList *list ));
- X Global void AppendToCurrent P((LinkList *list , Pointer contents ));
- X Global void PrependToCurrent P((LinkList *list , Pointer contents ));
- X+ Global void deleteList P((LinkList *list ));
- X Global void freeList P((LinkList *list ));
- X Global void freeCurrent P((LinkList *list ));
- X+ Global Bool freeMatchingLeaf P((LinkList *list , Pointer contents ));
- X+ Global LinkLeaf *findMatchingLeaf P((LinkList *list , Pointer contents ));
- X+ Global int indexOfContents P((LinkList *list , Pointer contents ));
- X+ Global Pointer getIndexedContents P((LinkList *list , int index ));
- X+ Global void freeLeaf P((LinkList *list , LinkLeaf *leaf ));
- X+ Global Pointer deleteLeaf P((LinkList *list , LinkLeaf *leaf ));
- X
- X /* end function prototypes */
- X
- Xdiff -c version1/main.c version2/main.c
- X*** version1/main.c Mon Sep 10 15:30:57 1990
- X--- version2/main.c Thu Sep 27 17:00:51 1990
- X***************
- X*** 140,145 ****
- X--- 140,155 ----
- X Tfree(server->fdd->inBuffer.data);
- X close(server->fdd->fd);
- X NotUsingFD(server->fdd->fd);
- X+ freeList(&client->server_list);
- X+ freeMatchingLeaf(&client_list, (Pointer *)client);
- X+ debug
- X+ (
- X+ 1,
- X+ (
- X+ stderr, "CloseConnection: client = %d, server = %d\n",
- X+ client->fdd->fd, server->fdd->fd
- X+ )
- X+ );
- X }
- X
- X static void
- X***************
- X*** 392,404 ****
- X }
- X }
- X }
- X! ForAllInList(&client_list)
- X {
- X client = (Client *)CurrentContentsOfList(&client_list);
- X- if (!SendBuffer(client->fdd->fd, &client->fdd->outBuffer))
- X- CloseConnection(client);
- X server = (Server *)(TopOfList(&client->server_list));
- X! if (!SendBuffer(server->fdd->fd, &server->fdd->outBuffer))
- X CloseConnection(client);
- X }
- X }
- X--- 402,420 ----
- X }
- X }
- X }
- X! client_list.current = client_list.top;
- X! while (client_list.current != (LinkLeaf *)(&client_list))
- X {
- X client = (Client *)CurrentContentsOfList(&client_list);
- X server = (Server *)(TopOfList(&client->server_list));
- X! if
- X! (
- X! SendBuffer(client->fdd->fd, &client->fdd->outBuffer)
- X! &&
- X! SendBuffer(server->fdd->fd, &server->fdd->outBuffer)
- X! )
- X! client_list.current = client_list.current->next;
- X! else
- X CloseConnection(client);
- X }
- X }
- X***************
- X*** 1082,1088 ****
- X #if (mskcnt>4)
- X static Bool
- X ANYSET(src)
- X! long src[];
- X {
- X int cri;
- X
- X--- 1098,1104 ----
- X #if (mskcnt>4)
- X static Bool
- X ANYSET(src)
- X! long *src;
- X {
- X int cri;
- X
- Xdiff -c version1/print11.c version2/print11.c
- X*** version1/print11.c Mon Sep 10 14:31:17 1990
- X--- version2/print11.c Mon Oct 8 18:28:53 1990
- X***************
- X*** 46,51 ****
- X--- 46,52 ----
- X
- X static char *REQUESTHEADER = "............REQUEST";
- X static char *EVENTHEADER = "..............EVENT";
- X+ static char *SYNTHETIC_EVENTHEADER = "....SYNTHETIC EVENT";
- X static char *ERRORHEADER = "..............ERROR";
- X static char *REPLYHEADER = "..............REPLY";
- X
- X***************
- X*** 307,317 ****
- X * Event Printing procedures
- X */
- X
- X Global void
- X KeyPressEvent(buf)
- X unsigned char *buf;
- X {
- X! PrintField(buf, 0, 1, EVENT, EVENTHEADER) /* KeyPress */ ;
- X if (CurrentVerbose < 2)
- X return;
- X PrintField(buf, 1, 1, KEYCODE, "detail");
- X--- 308,328 ----
- X * Event Printing procedures
- X */
- X
- X+ static void
- X+ PrintEventName(buf)
- X+ unsigned char *buf;
- X+ {
- X+ if (IByte(&buf[0]) & 0x80)
- X+ PrintField(buf, 0, 1, EVENT, SYNTHETIC_EVENTHEADER);
- X+ else
- X+ PrintField(buf, 0, 1, EVENT, EVENTHEADER);
- X+ }
- X+
- X Global void
- X KeyPressEvent(buf)
- X unsigned char *buf;
- X {
- X! PrintEventName(buf) /* KeyPress */ ;
- X if (CurrentVerbose < 2)
- X return;
- X PrintField(buf, 1, 1, KEYCODE, "detail");
- X***************
- X*** 332,338 ****
- X KeyReleaseEvent(buf)
- X unsigned char *buf;
- X {
- X! PrintField(buf, 0, 1, EVENT, EVENTHEADER) /* KeyRelease */ ;
- X if (CurrentVerbose < 2)
- X return;
- X PrintField(buf, 1, 1, KEYCODE, "detail");
- X--- 343,349 ----
- X KeyReleaseEvent(buf)
- X unsigned char *buf;
- X {
- X! PrintEventName(buf) /* KeyRelease */ ;
- X if (CurrentVerbose < 2)
- X return;
- X PrintField(buf, 1, 1, KEYCODE, "detail");
- X***************
- X*** 353,359 ****
- X ButtonPressEvent(buf)
- X unsigned char *buf;
- X {
- X! PrintField(buf, 0, 1, EVENT, EVENTHEADER) /* ButtonPress */ ;
- X if (CurrentVerbose < 2)
- X return;
- X PrintField(buf, 1, 1, BUTTON, "detail");
- X--- 364,370 ----
- X ButtonPressEvent(buf)
- X unsigned char *buf;
- X {
- X! PrintEventName(buf) /* ButtonPress */ ;
- X if (CurrentVerbose < 2)
- X return;
- X PrintField(buf, 1, 1, BUTTON, "detail");
- X***************
- X*** 374,380 ****
- X ButtonReleaseEvent(buf)
- X unsigned char *buf;
- X {
- X! PrintField(buf, 0, 1, EVENT, EVENTHEADER) /* ButtonRelease */ ;
- X if (CurrentVerbose < 2)
- X return;
- X PrintField(buf, 1, 1, BUTTON, "detail");
- X--- 385,391 ----
- X ButtonReleaseEvent(buf)
- X unsigned char *buf;
- X {
- X! PrintEventName(buf) /* ButtonRelease */ ;
- X if (CurrentVerbose < 2)
- X return;
- X PrintField(buf, 1, 1, BUTTON, "detail");
- X***************
- X*** 395,401 ****
- X MotionNotifyEvent(buf)
- X unsigned char *buf;
- X {
- X! PrintField(buf, 0, 1, EVENT, EVENTHEADER) /* MotionNotify */ ;
- X if (CurrentVerbose < 2)
- X return;
- X PrintField(buf, 1, 1, MOTIONDETAIL, "detail");
- X--- 406,412 ----
- X MotionNotifyEvent(buf)
- X unsigned char *buf;
- X {
- X! PrintEventName(buf) /* MotionNotify */ ;
- X if (CurrentVerbose < 2)
- X return;
- X PrintField(buf, 1, 1, MOTIONDETAIL, "detail");
- X***************
- X*** 416,422 ****
- X EnterNotifyEvent(buf)
- X unsigned char *buf;
- X {
- X! PrintField(buf, 0, 1, EVENT, EVENTHEADER) /* EnterNotify */ ;
- X if (CurrentVerbose < 2)
- X return;
- X PrintField(buf, 1, 1, ENTERDETAIL, "detail");
- X--- 427,433 ----
- X EnterNotifyEvent(buf)
- X unsigned char *buf;
- X {
- X! PrintEventName(buf) /* EnterNotify */ ;
- X if (CurrentVerbose < 2)
- X return;
- X PrintField(buf, 1, 1, ENTERDETAIL, "detail");
- X***************
- X*** 438,444 ****
- X LeaveNotifyEvent(buf)
- X unsigned char *buf;
- X {
- X! PrintField(buf, 0, 1, EVENT, EVENTHEADER) /* LeaveNotify */ ;
- X if (CurrentVerbose < 2)
- X return;
- X PrintField(buf, 1, 1, ENTERDETAIL, "detail");
- X--- 449,455 ----
- X LeaveNotifyEvent(buf)
- X unsigned char *buf;
- X {
- X! PrintEventName(buf) /* LeaveNotify */ ;
- X if (CurrentVerbose < 2)
- X return;
- X PrintField(buf, 1, 1, ENTERDETAIL, "detail");
- X***************
- X*** 460,466 ****
- X FocusInEvent(buf)
- X unsigned char *buf;
- X {
- X! PrintField(buf, 0, 1, EVENT, EVENTHEADER) /* FocusIn */ ;
- X if (CurrentVerbose < 2)
- X return;
- X PrintField(buf, 1, 1, ENTERDETAIL, "detail");
- X--- 471,477 ----
- X FocusInEvent(buf)
- X unsigned char *buf;
- X {
- X! PrintEventName(buf) /* FocusIn */ ;
- X if (CurrentVerbose < 2)
- X return;
- X PrintField(buf, 1, 1, ENTERDETAIL, "detail");
- X***************
- X*** 473,479 ****
- X FocusOutEvent(buf)
- X unsigned char *buf;
- X {
- X! PrintField(buf, 0, 1, EVENT, EVENTHEADER) /* FocusOut */ ;
- X if (CurrentVerbose < 2)
- X return;
- X PrintField(buf, 1, 1, ENTERDETAIL, "detail");
- X--- 484,490 ----
- X FocusOutEvent(buf)
- X unsigned char *buf;
- X {
- X! PrintEventName(buf) /* FocusOut */ ;
- X if (CurrentVerbose < 2)
- X return;
- X PrintField(buf, 1, 1, ENTERDETAIL, "detail");
- X***************
- X*** 486,492 ****
- X KeymapNotifyEvent(buf)
- X unsigned char *buf;
- X {
- X! PrintField(buf, 0, 1, EVENT, EVENTHEADER) /* KeymapNotify */ ;
- X if (CurrentVerbose < 2)
- X return;
- X PrintBytes(&buf[1], (long)31,"keys");
- X--- 497,503 ----
- X KeymapNotifyEvent(buf)
- X unsigned char *buf;
- X {
- X! PrintEventName(buf) /* KeymapNotify */ ;
- X if (CurrentVerbose < 2)
- X return;
- X PrintBytes(&buf[1], (long)31,"keys");
- X***************
- X*** 496,502 ****
- X ExposeEvent(buf)
- X unsigned char *buf;
- X {
- X! PrintField(buf, 0, 1, EVENT, EVENTHEADER) /* Expose */ ;
- X if (CurrentVerbose < 2)
- X return;
- X printfield(buf, 2, 2, CARD16, "sequence number");
- X--- 507,513 ----
- X ExposeEvent(buf)
- X unsigned char *buf;
- X {
- X! PrintEventName(buf) /* Expose */ ;
- X if (CurrentVerbose < 2)
- X return;
- X printfield(buf, 2, 2, CARD16, "sequence number");
- X***************
- X*** 512,518 ****
- X GraphicsExposureEvent(buf)
- X unsigned char *buf;
- X {
- X! PrintField(buf, 0, 1, EVENT, EVENTHEADER) /* GraphicsExposure */ ;
- X if (CurrentVerbose < 2)
- X return;
- X printfield(buf, 2, 2, CARD16, "sequence number");
- X--- 523,529 ----
- X GraphicsExposureEvent(buf)
- X unsigned char *buf;
- X {
- X! PrintEventName(buf) /* GraphicsExposure */ ;
- X if (CurrentVerbose < 2)
- X return;
- X printfield(buf, 2, 2, CARD16, "sequence number");
- X***************
- X*** 530,536 ****
- X NoExposureEvent(buf)
- X unsigned char *buf;
- X {
- X! PrintField(buf, 0, 1, EVENT, EVENTHEADER) /* NoExposure */ ;
- X if (CurrentVerbose < 2)
- X return;
- X printfield(buf, 2, 2, CARD16, "sequence number");
- X--- 541,547 ----
- X NoExposureEvent(buf)
- X unsigned char *buf;
- X {
- X! PrintEventName(buf) /* NoExposure */ ;
- X if (CurrentVerbose < 2)
- X return;
- X printfield(buf, 2, 2, CARD16, "sequence number");
- X***************
- X*** 543,549 ****
- X VisibilityNotifyEvent(buf)
- X unsigned char *buf;
- X {
- X! PrintField(buf, 0, 1, EVENT, EVENTHEADER) /* VisibilityNotify */ ;
- X if (CurrentVerbose < 2)
- X return;
- X printfield(buf, 2, 2, CARD16, "sequence number");
- X--- 554,560 ----
- X VisibilityNotifyEvent(buf)
- X unsigned char *buf;
- X {
- X! PrintEventName(buf) /* VisibilityNotify */ ;
- X if (CurrentVerbose < 2)
- X return;
- X printfield(buf, 2, 2, CARD16, "sequence number");
- X***************
- X*** 555,561 ****
- X CreateNotifyEvent(buf)
- X unsigned char *buf;
- X {
- X! PrintField(buf, 0, 1, EVENT, EVENTHEADER) /* CreateNotify */ ;
- X if (CurrentVerbose < 2)
- X return;
- X printfield(buf, 2, 2, CARD16, "sequence number");
- X--- 566,572 ----
- X CreateNotifyEvent(buf)
- X unsigned char *buf;
- X {
- X! PrintEventName(buf) /* CreateNotify */ ;
- X if (CurrentVerbose < 2)
- X return;
- X printfield(buf, 2, 2, CARD16, "sequence number");
- X***************
- X*** 573,579 ****
- X DestroyNotifyEvent(buf)
- X unsigned char *buf;
- X {
- X! PrintField(buf, 0, 1, EVENT, EVENTHEADER) /* DestroyNotify */ ;
- X if (CurrentVerbose < 2)
- X return;
- X printfield(buf, 2, 2, CARD16, "sequence number");
- X--- 584,590 ----
- X DestroyNotifyEvent(buf)
- X unsigned char *buf;
- X {
- X! PrintEventName(buf) /* DestroyNotify */ ;
- X if (CurrentVerbose < 2)
- X return;
- X printfield(buf, 2, 2, CARD16, "sequence number");
- X***************
- X*** 585,591 ****
- X UnmapNotifyEvent(buf)
- X unsigned char *buf;
- X {
- X! PrintField(buf, 0, 1, EVENT, EVENTHEADER) /* UnmapNotify */ ;
- X if (CurrentVerbose < 2)
- X return;
- X printfield(buf, 2, 2, CARD16, "sequence number");
- X--- 596,602 ----
- X UnmapNotifyEvent(buf)
- X unsigned char *buf;
- X {
- X! PrintEventName(buf) /* UnmapNotify */ ;
- X if (CurrentVerbose < 2)
- X return;
- X printfield(buf, 2, 2, CARD16, "sequence number");
- X***************
- X*** 598,604 ****
- X MapNotifyEvent(buf)
- X unsigned char *buf;
- X {
- X! PrintField(buf, 0, 1, EVENT, EVENTHEADER) /* MapNotify */ ;
- X if (CurrentVerbose < 2)
- X return;
- X printfield(buf, 2, 2, CARD16, "sequence number");
- X--- 609,615 ----
- X MapNotifyEvent(buf)
- X unsigned char *buf;
- X {
- X! PrintEventName(buf) /* MapNotify */ ;
- X if (CurrentVerbose < 2)
- X return;
- X printfield(buf, 2, 2, CARD16, "sequence number");
- X***************
- X*** 611,617 ****
- X MapRequestEvent(buf)
- X unsigned char *buf;
- X {
- X! PrintField(buf, 0, 1, EVENT, EVENTHEADER) /* MapRequest */ ;
- X if (CurrentVerbose < 2)
- X return;
- X printfield(buf, 2, 2, CARD16, "sequence number");
- X--- 622,628 ----
- X MapRequestEvent(buf)
- X unsigned char *buf;
- X {
- X! PrintEventName(buf) /* MapRequest */ ;
- X if (CurrentVerbose < 2)
- X return;
- X printfield(buf, 2, 2, CARD16, "sequence number");
- X***************
- X*** 623,629 ****
- X ReparentNotifyEvent(buf)
- X unsigned char *buf;
- X {
- X! PrintField(buf, 0, 1, EVENT, EVENTHEADER) /* ReparentNotify */ ;
- X if (CurrentVerbose < 2)
- X return;
- X printfield(buf, 2, 2, CARD16, "sequence number");
- X--- 634,640 ----
- X ReparentNotifyEvent(buf)
- X unsigned char *buf;
- X {
- X! PrintEventName(buf) /* ReparentNotify */ ;
- X if (CurrentVerbose < 2)
- X return;
- X printfield(buf, 2, 2, CARD16, "sequence number");
- X***************
- X*** 639,645 ****
- X ConfigureNotifyEvent(buf)
- X unsigned char *buf;
- X {
- X! PrintField(buf, 0, 1, EVENT, EVENTHEADER) /* ConfigureNotify */ ;
- X if (CurrentVerbose < 2)
- X return;
- X printfield(buf, 2, 2, CARD16, "sequence number");
- X--- 650,656 ----
- X ConfigureNotifyEvent(buf)
- X unsigned char *buf;
- X {
- X! PrintEventName(buf) /* ConfigureNotify */ ;
- X if (CurrentVerbose < 2)
- X return;
- X printfield(buf, 2, 2, CARD16, "sequence number");
- X***************
- X*** 658,664 ****
- X ConfigureRequestEvent(buf)
- X unsigned char *buf;
- X {
- X! PrintField(buf, 0, 1, EVENT, EVENTHEADER) /* ConfigureRequest */ ;
- X if (CurrentVerbose < 2)
- X return;
- X PrintField(buf, 1, 1, STACKMODE, "stack-mode");
- X--- 669,675 ----
- X ConfigureRequestEvent(buf)
- X unsigned char *buf;
- X {
- X! PrintEventName(buf) /* ConfigureRequest */ ;
- X if (CurrentVerbose < 2)
- X return;
- X PrintField(buf, 1, 1, STACKMODE, "stack-mode");
- X***************
- X*** 678,684 ****
- X GravityNotifyEvent(buf)
- X unsigned char *buf;
- X {
- X! PrintField(buf, 0, 1, EVENT, EVENTHEADER) /* GravityNotify */ ;
- X if (CurrentVerbose < 2)
- X return;
- X printfield(buf, 2, 2, CARD16, "sequence number");
- X--- 689,695 ----
- X GravityNotifyEvent(buf)
- X unsigned char *buf;
- X {
- X! PrintEventName(buf) /* GravityNotify */ ;
- X if (CurrentVerbose < 2)
- X return;
- X printfield(buf, 2, 2, CARD16, "sequence number");
- X***************
- X*** 692,698 ****
- X ResizeRequestEvent(buf)
- X unsigned char *buf;
- X {
- X! PrintField(buf, 0, 1, EVENT, EVENTHEADER) /* ResizeRequest */ ;
- X if (CurrentVerbose < 2)
- X return;
- X printfield(buf, 2, 2, CARD16, "sequence number");
- X--- 703,709 ----
- X ResizeRequestEvent(buf)
- X unsigned char *buf;
- X {
- X! PrintEventName(buf) /* ResizeRequest */ ;
- X if (CurrentVerbose < 2)
- X return;
- X printfield(buf, 2, 2, CARD16, "sequence number");
- X***************
- X*** 705,711 ****
- X CirculateNotifyEvent(buf)
- X unsigned char *buf;
- X {
- X! PrintField(buf, 0, 1, EVENT, EVENTHEADER) /* CirculateNotify */ ;
- X if (CurrentVerbose < 2)
- X return;
- X printfield(buf, 2, 2, CARD16, "sequence number");
- X--- 716,722 ----
- X CirculateNotifyEvent(buf)
- X unsigned char *buf;
- X {
- X! PrintEventName(buf) /* CirculateNotify */ ;
- X if (CurrentVerbose < 2)
- X return;
- X printfield(buf, 2, 2, CARD16, "sequence number");
- X***************
- X*** 719,725 ****
- X CirculateRequestEvent(buf)
- X unsigned char *buf;
- X {
- X! PrintField(buf, 0, 1, EVENT, EVENTHEADER) /* CirculateRequest */ ;
- X if (CurrentVerbose < 2)
- X return;
- X printfield(buf, 2, 2, CARD16, "sequence number");
- X--- 730,736 ----
- X CirculateRequestEvent(buf)
- X unsigned char *buf;
- X {
- X! PrintEventName(buf) /* CirculateRequest */ ;
- X if (CurrentVerbose < 2)
- X return;
- X printfield(buf, 2, 2, CARD16, "sequence number");
- X***************
- X*** 732,738 ****
- X PropertyNotifyEvent(buf)
- X unsigned char *buf;
- X {
- X! PrintField(buf, 0, 1, EVENT, EVENTHEADER) /* PropertyNotify */ ;
- X if (CurrentVerbose < 2)
- X return;
- X printfield(buf, 2, 2, CARD16, "sequence number");
- X--- 743,749 ----
- X PropertyNotifyEvent(buf)
- X unsigned char *buf;
- X {
- X! PrintEventName(buf) /* PropertyNotify */ ;
- X if (CurrentVerbose < 2)
- X return;
- X printfield(buf, 2, 2, CARD16, "sequence number");
- X***************
- X*** 746,752 ****
- X SelectionClearEvent(buf)
- X unsigned char *buf;
- X {
- X! PrintField(buf, 0, 1, EVENT, EVENTHEADER) /* SelectionClear */ ;
- X if (CurrentVerbose < 2)
- X return;
- X printfield(buf, 2, 2, CARD16, "sequence number");
- X--- 757,763 ----
- X SelectionClearEvent(buf)
- X unsigned char *buf;
- X {
- X! PrintEventName(buf) /* SelectionClear */ ;
- X if (CurrentVerbose < 2)
- X return;
- X printfield(buf, 2, 2, CARD16, "sequence number");
- X***************
- X*** 759,765 ****
- X SelectionRequestEvent(buf)
- X unsigned char *buf;
- X {
- X! PrintField(buf, 0, 1, EVENT, EVENTHEADER) /* SelectionRequest */ ;
- X if (CurrentVerbose < 2)
- X return;
- X printfield(buf, 2, 2, CARD16, "sequence number");
- X--- 770,776 ----
- X SelectionRequestEvent(buf)
- X unsigned char *buf;
- X {
- X! PrintEventName(buf) /* SelectionRequest */ ;
- X if (CurrentVerbose < 2)
- X return;
- X printfield(buf, 2, 2, CARD16, "sequence number");
- X***************
- X*** 775,781 ****
- X SelectionNotifyEvent(buf)
- X unsigned char *buf;
- X {
- X! PrintField(buf, 0, 1, EVENT, EVENTHEADER) /* SelectionNotify */ ;
- X if (CurrentVerbose < 2)
- X return;
- X printfield(buf, 2, 2, CARD16, "sequence number");
- X--- 786,792 ----
- X SelectionNotifyEvent(buf)
- X unsigned char *buf;
- X {
- X! PrintEventName(buf) /* SelectionNotify */ ;
- X if (CurrentVerbose < 2)
- X return;
- X printfield(buf, 2, 2, CARD16, "sequence number");
- X***************
- X*** 790,796 ****
- X ColormapNotifyEvent(buf)
- X unsigned char *buf;
- X {
- X! PrintField(buf, 0, 1, EVENT, EVENTHEADER) /* ColormapNotify */ ;
- X if (CurrentVerbose < 2)
- X return;
- X printfield(buf, 2, 2, CARD16, "sequence number");
- X--- 801,807 ----
- X ColormapNotifyEvent(buf)
- X unsigned char *buf;
- X {
- X! PrintEventName(buf) /* ColormapNotify */ ;
- X if (CurrentVerbose < 2)
- X return;
- X printfield(buf, 2, 2, CARD16, "sequence number");
- X***************
- X*** 804,810 ****
- X ClientMessageEvent(buf)
- X unsigned char *buf;
- X {
- X! PrintField(buf, 0, 1, EVENT, EVENTHEADER) /* ClientMessage */ ;
- X if (CurrentVerbose < 2)
- X return;
- X PrintField(buf, 1, 1, CARD8, "format");
- X--- 815,821 ----
- X ClientMessageEvent(buf)
- X unsigned char *buf;
- X {
- X! PrintEventName(buf) /* ClientMessage */ ;
- X if (CurrentVerbose < 2)
- X return;
- X PrintField(buf, 1, 1, CARD8, "format");
- X***************
- X*** 818,824 ****
- X MappingNotifyEvent(buf)
- X unsigned char *buf;
- X {
- X! PrintField(buf, 0, 1, EVENT, EVENTHEADER) /* MappingNotify */ ;
- X if (CurrentVerbose < 2)
- X return;
- X printfield(buf, 2, 2, CARD16, "sequence number");
- X--- 829,835 ----
- X MappingNotifyEvent(buf)
- X unsigned char *buf;
- X {
- X! PrintEventName(buf) /* MappingNotify */ ;
- X if (CurrentVerbose < 2)
- X return;
- X printfield(buf, 2, 2, CARD16, "sequence number");
- Xdiff -c version1/server.c version2/server.c
- X*** version1/server.c Mon Sep 10 14:31:17 1990
- X--- version2/server.c Thu Sep 27 17:36:46 1990
- X***************
- X*** 31,38 ****
- X /* server.c: */
- X static void ProcessBuffer P((int fd , unsigned char *buf , long n , int
- X WriteFD ));
- X- static void WriteBuffer P((Client *client , long n , char *buf , int
- X- WriteFD ));
- X static long StartSetUpMessage P((Pointer private_data , unsigned char
- X *buf , long n ));
- X static long FinishSetUpMessage P((Pointer private_data , unsigned char
- X--- 31,36 ----
- X***************
- X*** 189,225 ****
- X server->fdd->inBuffer.num_Needed = 8;
- X }
- X
- X- static void
- X- WriteBuffer(client, n, buf, WriteFD)
- X- Client *client;
- X- long n;
- X- char *buf;
- X- int WriteFD;
- X- {
- X- int BytesToWrite = n;
- X- int num_written;
- X-
- X- while (BytesToWrite > 0)
- X- {
- X- num_written = write (WriteFD, buf, BytesToWrite);
- X- if (num_written > 0)
- X- {
- X- BytesToWrite -= num_written;
- X- buf += num_written;
- X- }
- X- else
- X- {
- X- if (errno == EWOULDBLOCK)
- X- printf("WriteBuffer: write would block (TODO)\n");
- X- if (errno == EINTR)
- X- printf("WriteBuffer: write interrupted (TODO)\n");
- X- perror("Error on write to Client/Server");
- X- CloseConnection(client);
- X- BytesToWrite = 0;
- X- }
- X- }
- X- }
- X-
- X /*
- X * StartSetUpMessage:
- X *
- X--- 187,192 ----
- X***************
- X*** 238,243 ****
- X--- 205,214 ----
- X short namelength;
- X short datalength;
- X
- X+ littleEndian = client->fdd->littleEndian = (buf[0] == 'l');
- X+ ((Server *)(TopOfList(&client->server_list)))->fdd->littleEndian
- X+ = littleEndian;
- X+
- X namelength = IShort(&buf[6]);
- X datalength = IShort(&buf[8]);
- X client->fdd->ByteProcessing = FinishSetUpMessage;
- X***************
- X*** 253,260 ****
- X long n;
- X {
- X Client *client = (Client *) private_data;
- X-
- X- littleEndian = client->fdd->littleEndian = (buf[0] == 'l');
- X
- X CurrentVerbose = ErrorVerbose;
- X PrintSetUpMessage(buf);
- X--- 224,229 ----
- Xdiff -c version1/table11.c version2/table11.c
- X*** version1/table11.c Mon Sep 10 14:31:18 1990
- X--- version2/table11.c Mon Oct 8 18:29:18 1990
- X***************
- X*** 428,433 ****
- X--- 428,466 ----
- X DefineEValue(p, 33L, "ClientMessage");
- X DefineEValue(p, 34L, "MappingNotify");
- X
- X+ DefineEValue(p, 128L + 2L, "KeyPress");
- X+ DefineEValue(p, 128L + 3L, "KeyRelease");
- X+ DefineEValue(p, 128L + 4L, "ButtonPress");
- X+ DefineEValue(p, 128L + 5L, "ButtonRelease");
- X+ DefineEValue(p, 128L + 6L, "MotionNotify");
- X+ DefineEValue(p, 128L + 7L, "EnterNotify");
- X+ DefineEValue(p, 128L + 8L, "LeaveNotify");
- X+ DefineEValue(p, 128L + 9L, "FocusIn");
- X+ DefineEValue(p, 128L + 10L, "FocusOut");
- X+ DefineEValue(p, 128L + 11L, "KeymapNotify");
- X+ DefineEValue(p, 128L + 12L, "Expose");
- X+ DefineEValue(p, 128L + 13L, "GraphicsExposure");
- X+ DefineEValue(p, 128L + 14L, "NoExposure");
- X+ DefineEValue(p, 128L + 15L, "VisibilityNotify");
- X+ DefineEValue(p, 128L + 16L, "CreateNotify");
- X+ DefineEValue(p, 128L + 17L, "DestroyNotify");
- X+ DefineEValue(p, 128L + 18L, "UnmapNotify");
- X+ DefineEValue(p, 128L + 19L, "MapNotify");
- X+ DefineEValue(p, 128L + 20L, "MapRequest");
- X+ DefineEValue(p, 128L + 21L, "ReparentNotify");
- X+ DefineEValue(p, 128L + 22L, "ConfigureNotify");
- X+ DefineEValue(p, 128L + 23L, "ConfigureRequest");
- X+ DefineEValue(p, 128L + 24L, "GravityNotify");
- X+ DefineEValue(p, 128L + 25L, "ResizeRequest");
- X+ DefineEValue(p, 128L + 26L, "CirculateNotify");
- X+ DefineEValue(p, 128L + 27L, "CirculateRequest");
- X+ DefineEValue(p, 128L + 28L, "PropertyNotify");
- X+ DefineEValue(p, 128L + 29L, "SelectionClear");
- X+ DefineEValue(p, 128L + 30L, "SelectionRequest");
- X+ DefineEValue(p, 128L + 31L, "SelectionNotify");
- X+ DefineEValue(p, 128L + 32L, "ColormapNotify");
- X+ DefineEValue(p, 128L + 33L, "ClientMessage");
- X+ DefineEValue(p, 128L + 34L, "MappingNotify");
- X
- X p = DefineType(BITGRAVITY, ENUMERATED, "BITGRAVITY", PrintENUMERATED);
- X DefineEValue(p, 0L, "Forget");
- SHAR_EOF
- $TOUCH -am 1008190090 xmon.patch2 &&
- chmod 0664 xmon.patch2 ||
- echo "restore of xmon.patch2 failed"
- set `wc -c xmon.patch2`;Wc_c=$1
- if test "$Wc_c" != "25407"; then
- echo original size 25407, current size $Wc_c
- fi
- fi
- exit 0
-
- Greg McFarlane
- |||| OTC ||
-
- ACSnet: gregm@otc.otca.oz.au
- UUCP: {uunet,mcvax}!otc.otca.oz.au!gregm
- Snail: GPO Box 7000, Sydney 2001, Australia
- Phone: +61 2 287 3139 Fax: +61 2 287 3299
-
- dan
- ----------------------------------------------------
- O'Reilly && Associates argv@sun.com / argv@ora.com
- Opinions expressed reflect those of the author only.
-